﻿@model IEnumerable<Commerce_phuc.Models.Entity.ProductQuanAo>
@{
    ViewBag.Title = "Quần Áo";
}
@using (Html.BeginForm("Index", "QuanAo", FormMethod.Post))
{
<div class="conten_title">
    <div class="row">
        <div class="col-md-4">
            <div class="col-md-2">
                <img src="~/Areas/Kuku/Admin/icon-48-module.png" />
            </div>
            <div class="col-md-10">
                <h4>Product Manager: Quần Áo</h4>
            </div>

        </div>
        <div class="col-md-7">

            <div class="col-md-4">

            </div>
        
            <div class="col-md-8 conten_title_right ">

                <a href="/Kuku/QuanAo/Index">
                    <img style="width:32px;" src="" />

                    <br />
                    back
                </a>
                <a href="">
                    <span class="icon-32-trash"></span>                   
                    <input type="submit" value="Delete All" onclick="return confirm('ban có chắc xóa tất cả' )" />
                </a>
                <a href="/Kuku/QuanAo/Add">
                    <span class="icon-32-new"></span>
                    new
                </a>


            </div>

        </div>
    </div>



</div>


<div class="content_table">
    <table cellpadding="1" cellspacing="1" border="1" class="table table-hover">
        <tr class="table_title">
            <th class="text-center"><input type="checkbox" id="checkboxall" /></th>
            <th class="text-center">Hình Ảnh</th>
            <th class="text-center">Tên sản phẩm</th>
            <th class="text-center">giá sản phẩm</th>
            <th class="text-center">Chủ đề sản phẩm</th>
            <th class="text-center">Số lượng</th>           
            <th class="text-center">Trạng thái</th>
            <th class="text-center">Delete | Edit</th>
        </tr>

        @foreach (var a in ViewBag.ListProduct)
        {
            <tr>
                <td class="text-center"><input type="checkbox"  class="chkCheckBoxId" name="productId" value="@a.ID"></td>
                <td class="text-center">@a.NameVN</td>
                <td class="text-center">@a.Image</td>
                <td class="text-center">@a.Price</td>
                <td class="text-center">@a.Category.NameVN</td>
                <td class="text-center">@a.Quantity</td>
                <td class="text-center">
                    @if (a.Status == true)
                    {
                       // <input type="checkbox" checked />

                         <img src="~/Content/admin/img/tick.png" />
                    }
                    else
                    {
                        <img src="~/Content/admin/img/publish_x.png" />
                    }
                </td>
                <td class="text-center">
                    <a  onclick="return confirm('ban có muốn xóa tên' + '&nbsp;' + '@a.NameVN')" href="/Kuku/QuanAo/Delete/@a.ID">
                        <img src="~/Areas/Kuku/Admin/delete.png" style="width: 20px; height: 20px" />
                    </a>
                    |
                    <a href="/Kuku/QuanAo/Edit/@a.ID">
                        <img src="~/Areas/Kuku/Admin/edit.png" style="width: 20px; height: 20px" />
                    </a>
                </td>
            </tr>
        }
           
       
    </table>
</div>
}
@section scripts{
   
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
            $(document).ready(function () {
                $('#checkboxall').click(function () {
                    if ($(this).is(":checked"))
                        $('.chkCheckBoxId').prop('checked', true);
                    else
                        $('.chkCheckBoxId').prop('checked', false);
                });
            });
    </script>
    



}
